#include<iostream>

using namespace std;
//////////////////////////// 
/*int main()
{
  int n = 0;
  int i = 0;
  cin>>n;

  double sum = 0.00;
  for(;sum<=n;++i,sum+=1.0/i);
  
  cout<<i<<endl;
  return 0;
}*/
///////////////////////////// 

int main()
{
  int arr[10] = {0};
  for(int i = 0;i<10;++i){
    cin>>arr[i];
  }

  int h = 0;
  cin>>h;

  int count = 0;
  for(int i = 0;i<10;++i){
    if(arr[i]<=h+30)++count;
  }

  cout<<count<<endl;
  return 0;
}



